<template>
	<view class="news-pages">
		<view class="title">{{info.noticeTitle}}</view>
		<mp-html :content="info.noticeContent"></mp-html>
	</view>
</template>

<script>
	import {
		getNoticesByIdApi
	} from '@/api/home.js'
	export default {
		data() {
			return {
				info: {
					noticeTitle: '',
					noticeContent: ''
				}
			}
		},
		methods: {
			getDetail() {
				uni.showLoading({
					title: '加载中',
					mask: true
				})
				getNoticesByIdApi({
					id: this.id
				}).then((res) => {
					this.info = res
				})
			},
		},
		onLoad(e) {
			this.id = e.id
			this.getDetail()
		}
	}
</script>

<style lang="scss" scoped>
	.news-pages {
		padding: 30rpx;

		.title {
			text-align: center;
			font-size: 34rpx;
			font-weight: bold;
			margin-bottom: 30rpx;
		}
	}
</style>